<?php

/**
 * Controller class.
 *
 * @version  $Id: controller.php 2 2009-10-02 23:06:43Z perfilev $
 * @package  System
 */

abstract class Controller
{
	/**
	 * @var  Response  Response that created the controller.
	 */
	public $response;

	/**
	 * @var  array Website settings
	 **/
	protected $settings = array();

	/**
	 * Creates a new controller instance.
	 *
	 * @return  void
	 */
	public function __construct()
	{
		$this->response = new Response();
		$this->settings = System::settings();
	}

	/**
	 * Automatically executed before the controller action.
	 *
	 * @return  void
	 */
	public function before()
	{
		// Nothing by default
	}

	/**
	 * Automatically executed after the controller action.
	 *
	 * @return  void
	 */
	public function after()
	{
		// Nothing by default
	}
}
